<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<{$config.weburl}>/templates/<{$config.temp}>/page.css" rel="stylesheet" type="text/css" />
<script src="<{$config.weburl}>/script/prototype.js" type=text/javascript></script>
<title></title>
</head>
<body>
<script type="text/javascript">
var city='<{$de.city}>';
var province='<{$de.province}>';
function getHTML(v)
{	
 
	var ob="city";
	var url = '<{$config.weburl}>/ajax_back_end.php';
	var sj = new Date();
	var pars = 'shuiji=' + sj+'&prov_id='+v;
	var myAjax = new Ajax.Request(
				url,
				{method: 'post', parameters: pars, onComplete: showResponse}
				);
	function showResponse(originalRequest)
	{
		var tempStr = 'var MyMe = ' + originalRequest.responseText; 
		var i=0;var j=0;
		eval(tempStr);
		for(var s in MyMe)
		{
			++j;
		}
		$(ob).options.length =j+1;
		for(var k in MyMe)
		{
			var cityId=MyMe[k][0];
			var ciytName=MyMe[k][1];
			$(ob).options[k].value = cityId;
			$(ob).options[k].text = ciytName;
			if(city!=''&&city==ciytName)
				$(ob).options[k].selected = true;
	　	}
	 }
　}
<{if $de.city}>
getHTML('<{$de.province}>');
<{/if}>

<{if $close!=''}>
window.parent.location.reload();
window.parent.close_win();
<{/if}>
</script>
<div class="admin_right_top">我的收货地址</div>
<form action=""  name="form1" method="post"   >
<table width="100%" border="0"  cellpadding="0" cellspacing="0" >
  
  <tr>
    <td  bgcolor="#EAEFF3" width="15%" align="right">收货人姓名:</td>
    <td width="85%"><input maxlength="30" name="name" value="<{$de.name}>" size="24">
      <font color="#FF0000">*</font></td>
  </tr>

  <tr>
    <td align="right" bgcolor="#EAEFF3">所在区域:</td>
    <td ><select  name="province" id="province" onChange="getHTML(this.value)" style="width:150px;" /><{if  $de.province==''}><option value="">选择省</option> <{else}><option value="<{$de.province}>"><{$de.province}></option>
      <{/if}><{$prov}></select>
      <font color="#FF0000">*</font>省<select name="city" id="city"  /><{if  $de.province==''}><option value="">选择省</option><{else}><option value="<{$de.city}>"><{$de.city}></option><{/if}></select>
      <font color="#FF0000">*</font>市/县</td>
  </tr>
 
  <tr>
    <td bgcolor="#EAEFF3" align="right">街道地址:</td>
    <td >
    <textarea  name="address" style="width:319px; height:61px;" ><{$de.address}></textarea>
      <font color="#FF0000">*</font>不用写上面的内容</td>
  </tr>
  <tr>
    <td bgcolor="#EAEFF3" align="right">邮政编码:</td>
    <td ><input name="zip"     maxlength="6" size="24" value="<{$de.zip}>" ></td>
  </tr>
  <tr>
    <td bgcolor="#EAEFF3" align="right">电话号码:</td>
    <td ><input name="tel1"    maxlength="4"  size="4" value="<{$de.tel1}>">
      -
      <input name="tel2"    maxlength="9" size="12"  value="<{$de.tel2}>">
      -
      <input name="tel3"    maxlength="4" size="4"  value="<{$de.tel3}>">
      &nbsp;&nbsp;区号-电话号码-分机号码</td>
  </tr>
  <tr>
    <td bgcolor="#EAEFF3" align="right">手机号码:</td>
    <td ><input  name="mobile"   maxlength="18"  size="24"  value="<{$de.mobile}>"></td>
  </tr>
  
  <tr>
      <td bgcolor="#EAEFF3" >&nbsp;</td>
    <td colspan="2"  align="left">
    <input type="hidden" name="act" value="<{if $smarty.get.adrid!=''}>edit<{else}>submit<{/if}>">
      <input type="hidden" name="edid"  value="<{$smarty.get.adrid}>">
    <input  type="submit"  value="保存"  name="submit"   size="24"></td>
  </tr>
</table>
</form>
</body>
</html>
